﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Farmacia.Entities;
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.Unity;
using System.Data.Common;

namespace Farmacia.DataAccess
{
    public class ComprobanteVentaDAO:MasterDAEL, iComprobanteVentaDAO 
    {
        public List<ComprobantedeVenta> GetFromComprobantebyCriterioandFecha(string criterio, DateTime fecha1, DateTime fecha2)
        {
            object[] param = new object[3];
            param[0] = criterio;
            param[1] = fecha1;
            param[2] = fecha2;

            var query = DataBase.ExecuteSprocAccessor<ComprobantedeVenta>("GetFromComprobantebyCriterioandFecha", param);
            return query.ToList();
        }
    }
}
